/*
 * Initialization.c
 *
 *  Created on: Nov 5, 2012
 *      Author: banfield
 */

#include "Initialization.h"
#include "inc/lm3s2965.h"

void IOInit(void){
	unsigned long dummy;

    // Enable the GPIO port that is used for the on-board LED.
    SYSCTL_RCGC2_R = SYSCTL_RCGC2_GPIOG;

    // Do a dummy read to insert a few cycles after enabling the peripheral.
    dummy = SYSCTL_RCGC2_R;

    // Enable the GPIO pin for the LED (PG2).  Set the direction as output, and
    // enable the GPIO pin for digital function.
    GPIO_PORTG_DIR_R = 0x04;
    GPIO_PORTG_DEN_R = 0x04;
}
